<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/9/18 0018
 * Time: 上午 10:18
 */
namespace app\common\validate;

class requestPaymentValidate extends BaseValidate{
    protected $rule = [
        'userId' => 'require|isNotEmpty',
        'storeId' => 'require|isNotEmpty',
        'orderSource' => 'require|checkorderSource'
    ];


    protected $message=[
        'userId' => '用户id不能为空',
        'storeId' => '缺少店铺id',
        'orderSource' => '参数错误'
    ];
    protected function checkorderSource($value){
        if($value==1 || $value==2 || $value==3){
            return true;
        }
        return false;

    }
}